<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<script type="text/javascript">
	function back(){
		alert(99);
		form[0].action="inputindex.do";
		form[0].submit;
	}
</script>

</head>
<body>
<form action="inputindex.do" method="post">
	<table width="80%" align="center">
	<tr>
		<td colspan="4" align="right"><a href="add.jsp">添加</a></td>
	</tr>
		<tr>
			<td>编号</td>
			<td>姓名</td>
			<td>年龄</td>
		</tr>
		<%int i=0; %>
		<c:forEach items="${list }" var="bean">
			 <tr>
			<td> <%i++;  %><%=i %></td>
			<%-- <td>${bean.id }</td> --%>
			<td>${bean.name }</td>
			<td>${bean.age }</td>
			<td><a href="delete.do?id=${bean.id } ">删除</a></td>
			<td><a href="gotoupdate.do?id=${bean.id }">更新</a></td>
		</tr> 
		</c:forEach> 
	</table>
	<input type="button" onclick="back()" value="返回">
	<input type="submit" value="返回">
</form>
</body>
</html>